import lombok.extern.slf4j.Slf4j;
import org.apache.logging.log4j.ThreadContext;

@Slf4j
class TestThread extends Thread {
    public TestThread(String name) {
        super(name);
    }

    @Override
    public void run() {
        ThreadContext.put("ROUTINGKEY", Thread.currentThread().getName());
        try {
            System.out.println(Thread.currentThread().getName());
            log.info(Thread.currentThread().getName());
            log.error("error:"+Thread.currentThread().getName());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
